package online.heycm;

import java.io.*;

/**
 * PDF File
 *
 * @author hey
 * @version 1.0
 * @since 2024-8-16 20:42:19
 */
public class PdfFile extends PDF {

    private final File originalFile;
    private final File saveFile;

    public PdfFile(File file) {
        this.originalFile = file;
        this.saveFile = file;
    }

    public PdfFile(File originalFile, File saveFile) {
        this.originalFile = originalFile;
        this.saveFile = saveFile;
    }

    @Override
    protected InputStream initInputStream() throws IOException {
        return new BufferedInputStream(new FileInputStream(originalFile));
    }

    @Override
    protected OutputStream initOutputStream() throws IOException {
        return new BufferedOutputStream(new FileOutputStream(saveFile));
    }
}
